<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit" />
<title>无标题文档</title>
<link href="__PUBLIC__/admin/sncss/css/style.css" rel="stylesheet" type="text/css" />
<link href="__PUBLIC__/admin/sncss/css/combo.select.css" rel="stylesheet" type="text/css" />
</head>

<body>

	<div class="place">
	<span>位置：</span>
	<ul class="placeul">
	<li><a>首页</a></li>
	<li><a>消息管理</a></li>
	<li><a>创建消息</a></li>
	</ul>
	</div>

	<div class="formbody">

	<div class="formtitle"><span>创建消息</span></div>
<form id="formid" name="form1" method="post" action="{:U('/Home/Messages/add_messages')}" onsubmit="return form1_submit();">
	<ul class="forminfo">

	<li><label>标题</label><input name="title" id="title" type="text" class="lginput" value="" /><i></i></li>
	<li><label>文章</label><textarea style="float: left;" name="article" id="article"></textarea><i></i></li>

	<li><label>&nbsp;</label><input type="submit" class="btn" value="创建消息"/></li>
	</ul>
</form>

	</div>


</body>
<script src="__PUBLIC__/admin/Js/jquery-1.7.2.min.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/ueditor/messageueditor.config.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
var editor = UE.getEditor('article',{    //content为要编辑的textarea的id
	initialFrameWidth: 800,   //初始化宽度
	initialFrameHeight: 200,   //初始化高度
});

</script>

<script type="text/javascript">
function form1_submit(){

	var title= $('#title').val();
	if(title.length == 0){
		layer.tips('请填写标题', '#title');return false;
	}
	var article = UE.getEditor('article').getContentTxt();
	if(article.length == 0){
		layer.tips('请录入文章', '#article');return false;
	}

}

//然后提交
</script>

</html>
